package main

import (
	"log"
	"net/http"
	_ "net/http/pprof"  //加入它，就可以在/debug/pprof下看到profiling信息
)

var sl []string

func Dummy(str string) string {
	bytes := []byte(str)
	s := string(bytes)
	sl = append(sl, s)
	return s
}

func t_http_prof()  {

	go func() {
		for {
			log.Println(Dummy("http://github.com/cshi"))
			//time.Sleep(5000 * time.Millisecond)
		}
	}()

	http.ListenAndServe("0.0.0.0:8000", nil)
}

func main() {
	t_http_prof()
}